﻿<?xml version="1.0" encoding="utf-8"?>
<applicationManifest>
  <users>
    <talend>
      <pb dev="UBP\sa_tal_batch_dev" ev1="UBP\sa_tal_batch_tst" ev2="UBP\sa_tal_batch_uat" ev3="UBP\sa_tal_batch_ev3" prd="UBP\sa_tal_batch_prd" />
      <am dev="UBP\sa_tal_batch_dev" ev1="UBP\sa_tal_batch_tst" ev2="UBP\sa_tal_batch_uat" ev3="UBP\sa_tal_batch_ev3" prd="UBP\sa_tal_batch_prd" />
      <common dev="UBP\sa_tal_batch_dev" ev1="UBP\sa_tal_batch_tst" ev2="UBP\sa_tal_batch_uat" ev3="UBP\sa_tal_batch_ev3" prd="UBP\sa_tal_batch_prd" />
    </talend>
  </users>
  <!-- Begin : Define users and groups for this application -->
  <usersAndGroups>
    <usersAndGroup name="DeploymentTo" description="Contacts to inform for managed actions" type="mail">
      <add value="toto@test.fr" environment="DEV" />
      <add value="toto@test.fr" environment="Uat" />
      <add value="toto@test.fr" environment="Prd" />
    </usersAndGroup>
    <usersAndGroup name="DeploymentCc" description="Contacts to inform for managed actions" type="mail">
      <add value="titi@test.fr" environment="DEV" />
      <add value="titi@test.fr" environment="Uat" />
      <add value="titi@test.fr" environment="Uat" />
    </usersAndGroup>
    <usersAndGroup name="serviceAccountForDeployment" description="Accound used to deploy the application in environment" type="user">
      <add value="Domain\DevUser" environment="DEV" />
      <add value="Domain\UatUser" environment="Uat" />
      <add value="Domain\PrdUser" environment="Prd" />
    </usersAndGroup>
    <usersAndGroup name="serviceAccountForMyToolCompany1Execution" description="Accound used to execute talend jobs for MyToolCompany1 scope" type="user">
      <add value="Domain\DevMyToolCompany1User" environment="DEV" />
      <add value="Domain\UatMyToolCompany1User" environment="Uat" />
      <add value="Domain\PrdMyToolCompany1User" environment="Prd" />
    </usersAndGroup>
    <usersAndGroup name="serviceAccountForMyToolCompany2Execution" description="Accound used to execute talend jobs for MyToolCompany2 scope" type="user">
      <add value="Domain\DevMyToolCompany2User" environment="DEV" />
      <add value="Domain\UatMyToolCompany2User" environment="Uat" />
      <add value="Domain\PrdMyToolCompany2User" environment="Prd" />
    </usersAndGroup>
    <usersAndGroup name="GroupForDevelopmentPlatformInteraction" description="Group which contains users and groups allowed to interact with the platform" type="group">
      <add value="Domain\GRP_MGT_APPLI1_DEV" environment="DEV">
        <user value="serviceAccountForDeployment" />
      </add>
      <add value="Domain\GRP_MGT_APPLI1_UAT" environment="Uat">
        <user value="serviceAccountForDeployment" />
      </add>
      <add value="Domain\GRP_MGT_APPLI1_PRD" environment="Prd">
        <user value="serviceAccountForDeployment" />
      </add>
    </usersAndGroup>
  </usersAndGroups>
  <!-- End : Define users and groups for this application -->

  <!-- Begin : Templates Definition -->
  <templates>
    <!-- default folder inherit security fronm this parent -->
    <!-- default fodler allow creation if it doesn't exist -->
    <template name="rootFolder" type="folders">
      <folders>
        <folder name="logFolder" value="D:\Logs" share="Logs" allowCreation="false" inheritSecurity="false" type="server">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="tempFolder" value="D:\Temp" allowCreation="false" inheritSecurity="false" type="server">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="toolsFolder" value="D:\Tools" allowCreation="false" inheritSecurity="false" type="server">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="sourcesFolder" value="D:\sources" share="Sources" allowCreation="false" inheritSecurity="false" type="server">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="backupFolder" value="D:\backup" share="backup" allowCreation="false" inheritSecurity="false" type="application">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="workdirFolder" value="D:\sources\Delivery\Workdir" share="Sources\Delivery\Workdir" allowCreation="false" inheritSecurity="false" type="application">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="deliveryFolder" value="D:\sources\Delivery\Workdir" share="Sources\Delivery\Workdir" allowCreation="false" inheritSecurity="false" type="application">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
        <folder name="logApplicationFolder" value="D:\Logs\AppLogs" type="application">
          <security>
            <add name="GroupForDevelopmentPlatformInteraction" rights="FullControl" />
          </security>
        </folder>
      </folders>
    </template>

    <template name="rootFolderTalendAM" type="folder">
      <folder name="rootFolder" value="D:\Talend\Jobs\AM" type="server">
        <security>
          <add name="$(users.Talend.am)" rights="FullControl" />
        </security>
      </folder>
    </template>

    <template name="rootFolderTalendPB" type="folder">
      <folder name="rootFolder" value="D:\Talend\Jobs\PB" type="server">
        <security>
          <add name="$(users.Talend.pb)" rights="FullControl" />
        </security>
      </folder>
    </template>


    <template name="rootFolderTalendCommon" type="folder">
      <folder name="rootFolder" value="D:\Talend\Jobs" type="server">
        <security>
          <add name="$(users.Talend.common)" rights="FullControl" />
        </security>
      </folder>
    </template>


    <template name="talendMiddleware" type="middleware">
      <middleware type="Talend">
        <executionContainer name="PB">
          <folders>
            <folder template="rootFolderTalendPB" />
          </folders>
        </executionContainer>
        <executionContainer name="AM">
          <folders>
            <folder template="rootFolderTalendAM" />
          </folders>
        </executionContainer>
        <executionContainer name="Common">
          <folders>
            <folder template="rootFolderTalendCommon" />
          </folders>
        </executionContainer>
      </middleware>
    </template>
    <template name="tomcatMiddleware" type="middleware">
      <middleware type="Tomcat">
        <executionContainer name="MyToolTomcat">
          <folders>
            <folder name="rootFolder" value="D:\Tomcat" />
          </folders>
          <windowsService name="Tomcat" friendlyName="MyTool Tomcat" />
        </executionContainer>
      </middleware>
    </template>

    <template name="standAloneWindowsExecutionServer" type="server">
      <server os="W2K8R2" cluster="false" winrmUseSSL="false" winrmPort="5985">
        <folders template="rootFolder" />
        <middlewares>
          <middleware template="talendMiddleware" />
        </middlewares>
      </server>
    </template>

    <template name="standAloneLinuxExecutionServer" type="server">
      <server os="RHLE7.5" cluster="false" ssh="true" port="22">
        <folders>
          <folder template="LogFolderRoot" />
        </folders>
        <middlewares>
          <middleware template="talendMiddleware" />
        </middlewares>
      </server>
    </template>


    <template name="deploymentConfiguration" type="configuration">
      <configuration>
        <logger outputFolder="d:\temp" archivingFolder="d:\temp\Target" />
        <mailing smtpserver="smtp.yahoo.fr">
          <to value="DeploymentTo" />
          <cc value="DeploymentCc" />
        </mailing>
      </configuration>
    </template>
    
  </templates>
  <!-- End : Templates Definition -->
  <!-- Begin : Servers Definition-->
  <servers>
    <!-- DEV : Begin environment -->
    <server name="MSVGVAETLDEV01P" template="standAloneWindowsExecutionServer" zone="Public" winrmUseSSL="true" />
    <!-- DEV : End environment -->
    <!-- TST1 : Begin environment -->
    <server name="MSVGVAETLTST01P" template="standAloneWindowsExecutionServer" zone="Public" />
    <!-- TST1 : End environment -->
    <!-- TST2 : Begin environment -->
    <server name="MSVGVAETLUAT01P" template="standAloneWindowsExecutionServer" zone="Public" />
    <server name="LXSRVTST201" template="standAloneLinuxExecutionServer" zone="Public" />
    <server name="LXSRVTST202" template="standAloneLinuxExecutionServer" zone="Public" />
    <!-- TST2 : End environment -->
    <!-- TST3 : Begin environment -->
    <server name="WINSRVTST301" template="standAloneWindowsExecutionServer" zone="Public" />
    <!-- TST3 : End environment -->
    <!-- TST4 : Begin environment -->
    <server name="WINSRVTST401" template="standAloneWindowsExecutionServer" zone="Public" />
    <!-- TST4 : End environment -->
    <!-- PRD : Begin environment -->
    <server name="WINSRVPRD01" template="clusterWindowsExecutionServer" zone="Public" clusterName="WinclusterMyTool" />
    <server name="WINSRVPRD02" template="clusterWindowsExecutionServer" zone="Public" clusterName="WinclusterMyTool" />
    <server name="WINSRVPRD03" template="standAloneWindowsExecutionServer" zone="Public" />
    <server name="LXSRVPRD01" template="clusterLinuxExecutionServer" zone="Public" clusterName="LxclusterMyTool" />
    <server name="LXSRVPRD02" template="clusterLinuxExecutionServer" zone="Public" clusterName="LxclusterMyTool" />
    <server name="LXSRVPRD03" template="standAloneLinuxExecutionServer" zone="Public" />
    <!-- PRD : End environment -->
  </servers>
  <!-- End : Servers Definition -->
  <applications>
    <application name="Talend" version="1.0" friendlyName="Talend Windows Infrastructure">
      <components>
        <!-- LaunchTask v1.7  -->
        <component name="launcher" componentName="launcher" version="1.7" componentType="talendJobs" middlewareTarget="Talend" packageUri="" packageConfigurationUri="">
          <relativeAttributes>
            <installationDirectory relativeValue="launcher_1.7" targetedName="rootFolder" targetedType="folder" targetedAttribute="value" separator="\" parent="middleware" />
            <logComponentDirectory relativeValue="launcher" targetedName="logApplicationFolder" targetedType="folder" targetedAttribute="value" separator="\" parent="server" />
          </relativeAttributes>
        </component>
        <!-- Tools Infrastructure  -->
        <component name="Tools" componentName="Tools" version="2.0" componentType="talendJobs" middlewareTarget="Talend" packageUri="" packageConfigurationUri="">
          <relativeAttributes>
            <installationDirectory relativeValue="tools" targetedName="rootFolder" targetedType="folder" targetedAttribute="value" separator="\" parent="middleware" />
          </relativeAttributes>
        </component>
      </components>
    </application>
  </applications>
  <deploymentTargets>
    <deploymentTarget environment="DEV" applicationName="Talend" version="1.0">
      <configuration template="deploymentConfiguration" />
      <deploymentNode nodeName="MSVGVAETLDEV01P" serverName="MSVGVAETLDEV01P">
        <component name="launcher" middlewareTarget="PB" />
        <component name="launcher" middlewareTarget="AM" />
        <component name="launcher" middlewareTarget="Common" />
        <component name="Tools" middlewareTarget="PB" />
        <component name="Tools" middlewareTarget="AM" />
        <component name="Tools" middlewareTarget="Common" />
      </deploymentNode>
      <!--<deploymentNode nodeName="LXSRVDEV01" serverName="LXSRVDEV01">
        <component name="launcher" middlewareTarget="MyToolCompany1" />
        <component name="launcher" middlewareTarget="MyToolCompany2" />
        <component name="launcher" middlewareTarget="COMMON" />
        <component name="Tools" middlewareTarget="MyToolCompany1" />
        <component name="Tools" middlewareTarget="MyToolCompany2" />
        <component name="Tools" middlewareTarget="COMMON" />
      </deploymentNode>-->
    </deploymentTarget>
  </deploymentTargets>
</applicationManifest>
